using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement.View.Rendering
{
    class BackgroundRenderer : Renderer
    {
        #region Fields

        private readonly Rectangle _backgroundRectangle;

        #endregion

        #region Public Methods

        public BackgroundRenderer(RenderManager manager, Rectangle backgroundRect)
            : base(manager)
        {
            _backgroundRectangle = backgroundRect;
        }

        public override void Render(IRenderable renderable)
        {
        }

        public override void Render(IRenderable renderable, string textureName)
        {   
        }

        public void Render(string textureName)
        {
            Texture2D texture = Manager.SpriteManager.GetSprite(textureName);

            if (texture != null)
                Manager.SpriteBatch.Draw(texture, _backgroundRectangle, Color.White);
        }

        #endregion
    }
}
